package intro;

public class SumTest {
    public static int sum(int param) {
        int sum = 0;
        for (int i = 1; i <= param; i++) {
            sum += i;
        }
        return sum;
    }

    public static int sum2(int param) {
        return param * (param + 1) / 2;
    }

    public static void main(String[] args) {
        System.out.println(sum(100));

        System.out.println(sum(100));

    }
}
